<!--{template common/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.css?{VERHASH}">
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
  <div class="bs-left-container  clearfix"> 
    <!--{template left}--> 
  </div>
  <div class="left-drager">
    <div class="left-drager-op">
      <div class="left-drager-sub"></div>
    </div>
  </div>
  <div class="bs-main-container  clearfix">
    <div class="main-header clearfix">
      <ul class="nav nav-pills">
        <li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
        <li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
        <li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz=ftp">{lang add_FTP_storage}</a> </li>
      </ul>
    </div>
    <div class="main-content">
        <div class="col-md-12">
          <form name="aliform" class="form-horizontal form-horizontal-left" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
            <input type="hidden" name="ftpsubmit" value="true" />
            <input type="hidden" name="bz" value="ftp" />
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            <div class="row mb-3">
              <label class="col-sm-2">{lang site_name}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control required" name="config[cloudname]" value="">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang IP_address}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control required" name="config[host]" value="" placeholder="{lang host_IP_address}">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang port}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control required" name="config[port]" value="21" placeholder="{lang port}">
                <span class="help-block"></span>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang username}</label>
              <div class="col-sm-10">
                <input type="text" class="form-control required" name="config[username]" value="" placeholder="{lang FTP_account_user_name}">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang password}</label>
              <div class="col-sm-10">
                <input type="password" class="form-control required" name="config[password]" value="" placeholder="{lang FTP_account_user_password}">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang FTP_encode}</label>
              <div class="col-sm-10">
                <select class="form-control" name="config[charset]">
                  <option value="GBK" selected="selected">GBK</option>
                  <option value="UTF-8">UTF-8</option>
                  <option value="BIG5">BIG5</option>
                </select>
                <span class="help-block">{lang oauth_ftp_encode_set}</span>
              </div>
           </div>
            <!--{if function_exists('ssh2_connect')}-->
            <div class="row mb-3">
              <label class="col-sm-2"></label>
              <div class="col-sm-10">
                <label class="radio-inline"><input type="radio"   class="form-check-input" name="config[ssl]" checked="checked" value="0" onclick="$('#pasv').show();">{lang way_FTP_connection}</label>
                <label class="radio-inline"><input type="radio"   class="form-check-input" name="config[ssl]"  value="2" onclick="$('#pasv').hide();">{lang use_ssh2_sftp}</label>
              </div>
            </div>
            <!--{/if}-->
            <div id="pasv" class="row mb-3">
              <label class="col-sm-2"></label>
              <div class="col-sm-10">
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="checkbox" id="config[pasv]" name="config[pasv]" checked="checked" value="1">
                  <label class="form-check-label" for="config[pasv]">{lang use_Passive_Mode}</label>
                </div>
                <div class="form-check form-check-inline">
                  <input class="form-check-input" type="checkbox" id="config[ssl]" name="config[ssl]"  value="1">
                  <label class="form-check-label" for="config[ssl]">{lang enable_secure_link}</label>
                </div>
              </div>
            </div>
            <dl>
              <input type="submit" class="btn btn-primary"  value="{lang add}">
            </dl>
          </form>
        </div>
    </div>
  </div>
</div>
<script type="text/javascript">
  jQuery(document).ready(function (e) {
    jQuery('select').lyearSelect();
  });
	function validate(form) {
		var i = 0;
		jQuery("input.required").each(function() {
			if(jQuery(this).val() == '') {
				jQuery(this).focus();
				return false;
			}
			i++;
		});
		if(i < jQuery("input.required").length) {
			return false;
		} else {
			return true;
		}
	}
</script>
<script type="text/javascript" src="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->